Skip to content

feat(runner): forward microvm-run command-line arguments to the VMM - #641

Open
stephan-gh wants to merge 1 commit into
microvm-nix:mainfrom
stephan-gh:run-args
Open

stephan-gh wants to merge 1 commit into
microvm-nix:mainfrom
stephan-gh:run-args

Conversation

@stephan-gh

Copy link
Copy Markdown
Contributor

Forward positional arguments in microvm-run to the VMM/hypervisor to allow passing extra options with nix run .#my-microvm -- <args>. This makes it possible to reuse the same runner/Nix derivation with additional runtime options, without having to edit and reevaluate the Nix configuration for each set of options. This can be used (for example) to:

  • Dynamically attach optional disks/devices with dynamic paths/IDs
  • Capture network traffic
  • Enable QEMU's GDB server (-s -S) for early boot debugging

microvm.extraArgsScript can also supply runtime arguments, but the script must be configured in advance and supply the arguments at runtime. CLI forwarding lets callers pass arguments directly. When both are used, CLI arguments come last.

The host module invokes microvm-run without arguments, so its behavior is unchanged.

Forward positional arguments in microvm-run to the VMM/hypervisor to allow
passing extra options with `nix run .#my-microvm -- <args>`. This makes it
possible to reuse the same runner/Nix derivation with additional runtime
options, without having to edit and reevaluate the Nix configuration for
each set of options. This can be used (for example) to:

- Dynamically attach optional disks/devices with dynamic paths/IDs
- Capture network traffic
- Enable QEMU's GDB server (-s -S) for early boot debugging

microvm.extraArgsScript can also supply runtime arguments, but the script
must be configured in advance and supply the arguments at runtime. CLI
forwarding lets callers pass arguments directly. When both are used, CLI
arguments come last.

The host module invokes microvm-run without arguments, so its behavior is
unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants